{{#models}}
{{#model}}
-module({{classname}}).

-export([encode/1]).

-export_type([{{classname}}/0]).

-type {{classname}}() ::
    #{ {{#vars}}'{{name}}' {{#required}}:={{/required}}{{^required}}=>{{/required}} {{{datatype}}}{{#hasMore}},
       {{/hasMore}}{{/vars}}
     }.

encode(#{ {{#vars}}'{{name}}' := {{{nameInCamelCase}}}{{#hasMore}},
          {{/hasMore}}{{/vars}}
        }) ->
    #{ {{#vars}}'{{baseName}}' => {{{nameInCamelCase}}}{{#hasMore}},
       {{/hasMore}}{{/vars}}
     }.
{{/model}}
{{/models}}
